|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectj3deditor.bin.util.UserData
public class UserData
Tool that loads, saves and manages user preferences.
| Field Summary | |
|---|---|
static java.lang.String |
dataPath
relative path of the root directory of user files. |
static java.lang.String |
languages
relative path of the language directory. |
static java.lang.String |
resources
relative path of the resources directory. |
| Constructor Summary | |
|---|---|
UserData()
Creates an instance of Userdata. |
|
| Method Summary | |
|---|---|
boolean |
getBooleanData(java.lang.String key)
Returns the value of the user preferences element which name is key. |
java.lang.Object |
getData(java.lang.String key)
Returns the value of the user preferences element which name is key. |
static java.io.File |
getFile(java.lang.String relativePath)
Returns the file representation of the given path relatively to the applications root directory. |
int |
getIntData(java.lang.String key)
Returns the value of the user preferences element which name is key. |
java.lang.String[][] |
getLanguageList()
Returns the list of available languages from the file the list of languages are stored in. |
void |
saveData()
Updates the file the user preferences are stored in. |
void |
setData(java.lang.String key,
java.lang.Object data)
Sets the value of the user preferences element which name is key. |
void |
updateLanguageList()
Updates the list of available languages. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String dataPath
public static final java.lang.String languages
public static final java.lang.String resources
| Constructor Detail |
|---|
public UserData()
Userdata.
| Method Detail |
|---|
public void updateLanguageList()
public void saveData()
public java.lang.String[][] getLanguageList()
public java.lang.Object getData(java.lang.String key)
key.
key - the name of the element
Object value of the
element which name is keypublic boolean getBooleanData(java.lang.String key)
key.
key - the name of the element
boolean value of
the element which name is keypublic int getIntData(java.lang.String key)
key.
key - the name of the element
int value of
the element which name is key
public void setData(java.lang.String key,
java.lang.Object data)
key.
key - the name of the elementdata - new value
public static java.io.File getFile(java.lang.String relativePath)
throws java.lang.Exception
relativePath - path of a file somewhere inside the applications root directory.
java.lang.Exception - if unable to create the required File
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||